Skip to content

TSDB: add bucket store metrics in querier #1996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jan 21, 2020
Merged

TSDB: add bucket store metrics in querier #1996

merged 27 commits into from
Jan 21, 2020

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Jan 17, 2020

This PR adds export of aggegate metrics from TSDB's store.BucketStore and storecache.InMemoryIndexCache, used by Querier component.

This PR uses same approach as #1990 and #1983 before that. It builds on #1990, and moves code related to aggegating and sending metrics into pkg/util/metrics_helper.go file.

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@pstibrany pstibrany requested a review from pracucci January 17, 2020 14:08
Signed-off-by: Peter Štibraný <[email protected]>
…ust to return results.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
We may want to optimize this in the future.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @pstibrany ! The design looks good. I just left few comments here and there.

Fixed sum for nil input.
Extracted common code for sum of counters/gauges with labels.
Fixed gauge output (was reported as counter)

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
@pstibrany
Copy link
Contributor Author

Thank you Marco for your review. I believe (I will double check) that I've addressed all your feedback now.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good job! LGTM 🎉

@pracucci pracucci merged commit ea1a045 into cortexproject:master Jan 21, 2020
@pstibrany pstibrany deleted the tsdb-block-store-metrics branch January 22, 2020 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants